package com.ruoyi.db.oms.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 购物车商品对象 oms_cart
 *
 * @author ruoyi
 * @date 2020-05-04
 */

@ApiModel("购物车商品实体类")
@Data
@EqualsAndHashCode(callSuper=true)
public class OmsCart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("购物车编号")
    @Excel(name = "购物车编号")
    private Long id;

    @ApiModelProperty("用户表的用户ID")
    @Excel(name = "用户表的用户ID")
    private Long userId;

    @ApiModelProperty("商品表的商品ID")
    @Excel(name = "商品表的商品ID")
    private Long goodsId;

    @ApiModelProperty("商品编号")
    @Excel(name = "商品编号")
    @Size(min = 0, max = 63, message = "商品编号长度不能超过63个字符")
    private String goodsSn;

    @ApiModelProperty("商品名称")
    @Excel(name = "商品名称")
    @Size(min = 0, max = 127, message = "商品名称长度不能超过127个字符")
    private String goodsName;

    @ApiModelProperty("商品货品表的货品ID")
    @Excel(name = "商品货品表的货品ID")
    private Long productId;

    @ApiModelProperty("商品货品的价格")
    @Excel(name = "商品货品的价格")
    private BigDecimal price;

    @ApiModelProperty("商品货品的数量")
    @Excel(name = "商品货品的数量")
    private Integer number;

    @ApiModelProperty("商品规格值列表，采用JSON数组格式")
    @Excel(name = "商品规格值列表，采用JSON数组格式")
    @Size(min = 0, max = 1023, message = "商品规格值列表，采用JSON数组格式长度不能超过1023个字符")
    private String specifications;

    @ApiModelProperty("购物车中商品是否选择状态")
    @Excel(name = "购物车中商品是否选择状态")
    private Boolean checked;

    @ApiModelProperty("商品图片或者商品货品图片")
    @Excel(name = "商品图片或者商品货品图片")
    @Size(min = 0, max = 255, message = "商品图片或者商品货品图片长度不能超过255个字符")
    private String picUrl;

    @ApiModelProperty("创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime addTime;

    @ApiModelProperty("逻辑删除")
    @Excel(name = "逻辑删除")
    private Integer deleted;
}
